﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using TpBaseObjects.Base;

namespace TpBaseObjects.Objects {
    
    public class FunktionsObj : MyBaseModel {

        #region Members

        private int funktionsKey;
        private string funktion;

        #endregion

        #region Constructor

        public FunktionsObj() {
        }

        #endregion

        #region Properties

        [DataMember]
        public int FunktionsKey {
            get { return this.funktionsKey; }
            set {
                if (this.funktionsKey == value) {
                    return;
                }
                this.funktionsKey = value;
                OnPropertyChanged(() => FunktionsKey);
            }
        }

        [DataMember]
        public string Funktion {
            get { return this.funktion; }
            set {
                if (this.funktion == value) {
                    return;
                }
                this.funktion = value;
                OnPropertyChanged(() => Funktion);
            }
        }
        
        #endregion

        #region Overides

        public override string ToString() {
            return this.Funktion + " (" + this.FunktionsKey.ToString() + ")";
        }
        #endregion

    }
}
